﻿@using Pyramid.Extentions
@using Pyramid.Models
@using Pyramid.Mvc.Html
@model StaffEditViewModel

<div class="pageContent">
	@using (Html.BeginForm("Edit","Staff",FormMethod.Post, new {@class = "pageForm required-validate", onsubmit = "return validateCallback(this, navTabAjaxDone);"}))
	{
		<div class="pageFormContent" layouth="60">
			@Html.HiddenFor(x=>x.Staff.Id)
			<p>
				@Html.LabelFor(model=>model.Staff.Code)
				@Html.CodeFieldFor(model => model.Staff.Code)
			</p>
			<p>
				@Html.LabelFor(model=>model.Staff.FullName)
				@Html.TextBoxFor(model => model.Staff.FullName, new {@class = "required", minlength = "2", maxlength = "6"})
			</p>
			<p>
				@Html.LabelFor(model=>model.Staff.Gender)
				@Html.DropDownList("Gender", Model.Staff.GenderEnum.ToSelectList(), new { @class = "required" })
			</p>
			<p>
				@Html.LabelFor(model=>model.Staff.Birthday)
				@Html.DateInputFor(model=>model.Staff.Birthday, "required")
			</p>
			<p>
				@Html.LabelFor(model=>model.Staff.IdCard)
				@Html.TextBoxFor(model=>model.Staff.IdCard, new {@class="required"})
			</p>
			<p>
				@Html.LabelFor(model=>model.Staff.Mobile)
				@Html.TextBoxFor(model=>model.Staff.Mobile, new {@class="required"})
			</p>
			<p class="nowrap">
				@Html.LabelFor(model=>model.Staff.HomeAddress)
				@Html.TextBoxFor(model=>model.Staff.HomeAddress, new {@class="longText"})
			</p>
			<div class="divider"></div>
			<p>
				@Html.LabelFor(model=>model.Staff.DepartmentId)
				@Html.DropDownListFor(model=>model.Staff.DepartmentId, Model.Departments, new {@class="combox required"})
			</p>
			<p>
				@Html.LabelFor(model=>model.Staff.PositionId)
				@Html.DropDownListFor(model=>model.Staff.PositionId, Model.StaffPositions, new {@class="combox required"})
			</p>
			<p>
				@Html.LabelFor(model=>model.Staff.EntryDate)
				@Html.DateInputFor(model=>model.Staff.EntryDate, "required")
			</p>
			<div class="divider"></div>
			<p class="nowrap">
				@Html.LabelFor(model=>model.Staff.BriefIntro)
				@Html.TextAreaFor(model=>model.Staff.BriefIntro,new {@class="longText longParagraph"})
			</p>
			<div class="divider"></div>
			<p>
				@Html.LabelFor(model=>model.Staff.CreateUserId)
				@Html.ReadonlyFieldFor(model=>model.Staff.CreateUserId)
			</p>
			<p>
				@Html.LabelFor(model=>model.Staff.CreateTime)
				@Html.ReadonlyDateTimeFor(model=>model.Staff.CreateTime)
			</p>
			<p>
				@Html.LabelFor(model=>model.Staff.EditUserId)
				@Html.ReadonlyFieldFor(model=>model.Staff.EditUserId)
			</p>
			<p>
				@Html.LabelFor(model=>model.Staff.EditTime)
				@Html.ReadonlyDateTimeFor(model=>model.Staff.EditTime)
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li>
					<div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">保存</button>
						</div>
					</div>
				</li>
				<li>
					<div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
	}
</div>
